'''
主视图
'''
from core import admin
from core import student
from core import teacher

main_dic = {
    '1': admin.view,
    '2': student.view,
    '3': teacher.view
}


def run():
    while True:
        print('''
        ====== 欢迎来到选课系统 ======
                1.管理员功能
                2.学生功能
                3.老师功能
        =========== end ===========
        ''')

        choice = input('请输入功能编号：').strip()
        if choice not in main_dic:
            print("请输入正确的编号！")
            continue

        main_dic.get(choice)()
